package com.asiainfo.kbisheet.components.grid
{
	import mx.formatters.CurrencyFormatter;
	import mx.formatters.NumberFormatter;
	
	public class KbsCurrencyFormatter extends CurrencyFormatter
	{
		public function KbsCurrencyFormatter()
		{
			super();
			currencySymbol = "";
			useThousandsSeparator="true";
			thousandsSeparatorTo=",";
			precision="2";
		}
		
		override public function format(value:Object):String{
			var result:String;
			if(value == null || value.toString().length == 0){
				result = '-';
			}
			else{ 
				result = super.format(value);
				if(result == null || result.length == 0){
					result = '-';
				}
			}
			return result;
		}
	}
}